<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<%@ include file="head.jsp"%>
<link rel="stylesheet" href="resources/css/login_style.css">
</head>

<body>
	<div>
		<section class="container">
			<div class="login">
				<h1>Pick2Pick 통합관리페이지</h1>
				<form name="loginForm" class="form-signin" role="form" method="post" action="index">
					<p>
						<input type="text" name="adminId" class="form-control" placeholder="아이디"
							<c:if test="${save_id != null}">value="${save_id}"</c:if> <c:if test="${save_id == null}">autofocus</c:if>>
					</p>
					<p>
						<input type="password" name="adminPw" class="form-control" placeholder="비밀번호"
							<c:if test="${save_id != null}">autofocus</c:if>>
					</p>
					<p class="remember_me">
						<label>
							<input type="checkbox" name="save_id" value="Y" <c:if test="${save_id != null}">checked</c:if>/>아이디저장
						</label>
					</p>
					<p class="submit">
						<input type="submit" name="commit" value="로그인">
					</p>
				</form>
			</div>
		</section>
	</div>

	<!-- Javascript -->
	<script src="resources/js/jquery.js"></script>
	<script src="resources/js/bootstrap.min.js"></script>
	<!-- 형식검사 클래스 참조 -->
	<script src="resources/js/string.js"></script>
	<script type="text/javascript">
		$(function() {
			$("form[name='loginForm']").submit(function() {
				if (!$("input[name='adminId']").val().isValue()) {
					alert("아이디를 입력하세요.");
					$("input[name='adminId']").focus();
					return false;
				}

				if (!$("input[name='adminPw']").val().isValue()) {
					alert("비밀번호를 입력하세요.");
					$("input[name='adminPw']").focus();
					return false;
				}
			});
		});
	</script>
</body>
</html>